import { RouterModule, Routes } from '@angular/router';
import { NgModule } from '@angular/core';

import { NbAuthComponent } from '@nebular/auth';
import { NgxLoginComponent } from './ngx-login/ngx-login.component';
import { RegisterComponent } from './register/register.component';

const routes: Routes = [{
  path: '',
  component: NbAuthComponent,
  children: [
    {
      path: 'ngx-login',
      component: NgxLoginComponent
    },
    {
      path: 'register',
      component: RegisterComponent
    },
    {
      path: '',
      redirectTo: 'ngx-login',
      pathMatch: 'full'
    },
  ]
}]

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule],
})
export class AuthRoutingModule {
}
